package com.css.fxfzdpzs.modules.home.service.impl;

import com.css.fxfzdpzs.modules.home.entity.HomeSys;
import com.css.fxfzdpzs.modules.home.entity.HomeSysProvince;
import com.css.fxfzdpzs.modules.home.repository.HomeRepository;
import com.css.fxfzdpzs.modules.home.service.HomeService;
import com.css.fxfzdpzs.modules.home.vo.HomeVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author y1fan
 * @description
 */
@Service
public class HomeServiceImpl implements HomeService {

    @Resource
    private HomeRepository homeRepository;

    @Override
    public HomeVO getHome() {
        HomeVO homeVO=new HomeVO();
        HomeSys homeSys=homeRepository.getHomeSys();
        homeVO.setHomeBase(homeSys);
        List<HomeSysProvince> homeSysProvinces=homeRepository.getHomeProvince();
        homeVO.setHomeSysProvinces(homeSysProvinces);
        return homeVO;
    }
}
